package com.brillilab.domain.enums.comments;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 内容类型：0文本,1图片,2语音,3视频,4文件
 */
@Getter
@AllArgsConstructor
public enum CommentsContentTypeEnum {

	TEXT("文本", 0), PICTURE("图片", 1), VOICE("语音", 2), VIDEO("视频", 3), FILE("文件", 4), CARD("实验卡", 5);

	public String name;
	
	private Integer value;

	public static String getKey(Integer value) {
		for (CommentsContentTypeEnum p : CommentsContentTypeEnum.values()) {
			if (p.getValue().equals(value)) {
				return p.name;
			}
		}
		return null;
	}
}
